import request from '@/utils/request'

export function selectShopList(query){
  return request({
    url: '/shop/list',
    method: 'get',
    params: query
  })
}

export function selectShopById(id){
  return request({
    url: '/shop/selectShopById/' + id,
    method: 'get'
  })
}

export function insertShop(data){
  return request({
    url: '/shop/insertShop',
    method: 'post',
    data: data
  })
}

export function updateShop(data){
  return request({
    url: '/shop/updateShop',
    method: 'put',
    data: data
  })
}

export function updateShopStatus(data){
  return request({
    url: '/shop/updateShopStatus',
    method: 'put',
    data: data
  })
}

export function deleteShop(id){
  return request({
    url: '/shop/deleteShop/' + id,
    method: 'delete'
  })
}

export function assignOperators(data){
  return request({
    url: '/shop/assignOperators',
    method: 'put',
    data: data
  })
}

export function transferOperators(data){
  return request({
    url: '/shop/transferOperators',
    method: 'put',
    data: data
  })
}

export function importExcel(data){
  return request({
    url: '/shop/importExcel',
    method: 'post',
    data: data
  })
}

export function exportExcel(query){
  return request({
    url: '/shop/export',
    method: 'get',
    params: query
  })
}
